The present invention in general relates to a technology for image processing. More particularly, this invention relates to a technology for halftone processing by varying the resolution.
When a document image input via a scanner or a personal computer (PC) or a document image received by a facsimile is printed on paper, conventionally, the resolution or the gradation of the image is. For example, if image data of an n-level is converted into image data of an m-level (n greater than m) having a double resolution, the resolution has been first doubled by the same processing as magnification processing, and then, gradation processing has been performed. Otherwise, contrary to the above-described procedure, the magnification processing has followed the gradation processing.
When image is a color image and an image forming apparatus is adapted to output a black-and-white image, it has been necessary to vary the gradation. Alternatively, when the resolution of the image is so high that the image forming apparatus cannot satisfy the requirements, it has been necessary to adjust the gradation. That is, when an input image and an output image are not the same in properties as each other, it has been necessary to adjust the resolution or gradation. In other words, the resolution or gradation has been adjusted so as to allow the input image and the output image to be viewed as similarly as possible by fitting the images to the visual characteristics of humans. Such adjustment could provide the output image with less inconsistency with the input image.
Such a magnification processing is disclosed in Japanese Patent Application Laid-Open No. 10-327316. Further, the gradation processing is disclosed in Japanese Patent Application Laid-Open No. 9-294209.
However, the technique of image processing disclosed in the above-mentioned publication has the following problems. That is, when the magnification processing is followed by the gradation processing, the gradation processing is performed by the use of image data having the increased number of pixels after the magnification processing, i.e., image data having an increased capacity. Consequently, there has arisen a problem that a large-capacity memory for temporarily storing n-level image data after the magnification processing is required, although the image data to be finally output as a processing result is image data of an m-level less than an n-level. Namely, there has arisen a problem of the necessity of the large-capacity memory which is used only temporarily in view of the processing.
Furthermore, since the image processing apparatus need input or output other image data in smooth association with other image processing, there is a demand that no image processing section which is liable to induce a rate-determining factor is provided as possible. Therefore, there has arisen a problem of the necessity of an arithmetic unit having high performance only to smoothly interpolate or vary the gradation of the image data having the capacity increased by the magnification processing from the n-level to the m-level.
In the meantime, when the gradation processing is followed by the magnification processing, since a pixel is interpolated (magnified) with respect to image data which has been already subjected to m-level processing, there has arisen a problem that n-level image information to be input cannot be sufficiently used, thereby reducing the quality of an image. In other words, there has arisen a problem of more conspicuous inconsistency of the output image with respect to the input image.
Moreover, in recent years, there have been devised a digital combined machine in which a facsimile functional section, a printer functional section and the like are added on a copying machine via a motherboard; a digital combined machine in which a copying machine functional section, a facsimile functional section, a printer functional section and the like are independently constituted into units, and image data to be input from each of the units is unified in the unit in charge of control or processing while being controlled by a process controller for controlling the processing of the entire apparatus; and the like.
In these digital combined machines, when each of the functional sections or units is improved in its function, the functional section or unit is replaced with an improved functional section or unit. Consequently, it is necessary to more appropriately adjust the resolution or gradation in order to obtain an output image with less inconsistency with the input image. However, it is uneconomical to replace a memory of a large capacity which is used only temporarily with a memory of a larger capacity or replace an arithmetic unit with an arithmetic unit of a higher speed every time some of the functional units are improved, thus arising a problem that efficient image processing cannot be performed by the use of the existing memory or arithmetic unit.
It is an object of the present invention to provide a technique in which resolution varying processing and gradation varying processing can be performed, so as to reduce inconsistency between an input image and an output image, efficiently.
The image processing apparatus according to one aspect of the present invention comprises following units. That is, a gradation direction determining unit which determines a gradation direction; a spatial frequency determining unit which determines a spatial frequency at the pixel position of the target pixel; a dividing unit which divides the target pixel into fine pixels; and a gradation determining unit which determines a gradation level of the fine pixel produced by the dividing unit based on the gradation level of the target pixel, the gradation direction determined by the gradation direction determining unit and the spatial frequency determined by the spatial frequency determining unit.
According to the above-mentioned aspect of this invention, the gradation of the divided fine pixel can be determined even if the fine pixel is not temporarily stored in the storage unit such as a memory.
Furthermore, it is preferable that, the spatial frequency determining unit determines the spatial frequency at the pixel position of the target pixel based on the type of the image. Accordingly, a proper spatial frequency can be determined with respect to each of the pixels composing the image according to the kind of image.
Moreover, it is preferable that, the dividing unit bisects or quadrisects the target pixel. Accordingly, the image data composed of the fine pixels can be controlled by simple control.
Moreover, it is preferable that, a gradation varying unit is provided for varying the gradation level of the target pixel to a gradation level in a range narrower than that of the gradation level. Accordingly, the capacity of the image data can be reduced.
Moreover, it is preferable that, the gradation varying unit compares the gradation level of the target pixel with a predetermined threshold, so as to vary the gradation level of the target pixel. Accordingly, the gradation level can be varied by a simple comparing operation.
Moreover, it is preferable that, the gradation varying unit varies the gradation level of the target pixel by the use of a predetermined dither matrix. Accordingly, the gradation levels of the plurality of target pixels can be varied by one simple comparing operation.
Moreover, it is preferable that, the gradation determining unit determines a gradation level of the fine pixel produced by the dividing unit based on the dither matrix and the element position of the dither matrix. Accordingly, the gradation level of the fine pixel can be varied by a simple comparing operation.
The image processing method according to another aspect of the present invention comprises following steps. That is, determining a gradation direction; determining a spatial frequency at the pixel position of the target pixel; dividing the target pixel into fine pixels; and determining a gradation level of the fine pixel produced in the dividing step based on the gradation level of the target pixel, the gradation direction determined in the gradation direction determining step and the spatial frequency determined in the spatial frequency determining step.
According to the above-mentioned aspect of this invention, the gradation of the divided fine pixel can be determined even if the fine pixel is not temporarily stored in the storage unit such as a memory.
Furthermore, it is preferable that a step of varying the gradation level of the target pixel to a gradation level in a range narrower than that of the gradation level is added. Accordingly, the capacity of the image data can be reduced.
The computer readable recording medium according to still another aspect of the present invention stores a computer program which when executed realizes the image processing method according to the present invention.
Other objects and features of this invention will become apparent from the following description with reference to the accompanying drawings.